package com.system.controller;

import com.system.pojo.EmployeeSalary;
import com.system.service.EmployeeSalaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * Created by 陈文杰 on 2022/6/10 21:58
 */
@Controller
public class EmployeesSalaryController {

    @Autowired
    EmployeeSalaryService employeeSalaryService;

    @RequestMapping("/toEmployeesSalary")
    public ModelAndView toEmployeesSalary(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("employeeSalaries",employeeSalaryService.queryEmployeeSalaryAll());
        modelAndView.setViewName("employeesSalary");
        return modelAndView;
    }

    @RequestMapping("/toEmployeesSalaryOutput")
    public ModelAndView toEmployeesSalaryOutput(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("employeeSalaries",employeeSalaryService.queryEmployeeSalaryAll());
        modelAndView.setViewName("employeesSalaryOutput");
        return modelAndView;
    }
}
